﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.Serialization;

namespace SMA.GENTEv1.Exceptions
{
    [Serializable]
    class GenteBaseException : System.Exception
    {
        private const String customMessage = "[GenteException]";
        //private const String customMessage = "O Serviço GENTE encontra-se instável no momento. A operação não pode ser concluida.";

        #region Base Constructors
        public GenteBaseException() : base()
        {
            
        }

        public GenteBaseException(string message) : base(message) { }

        public GenteBaseException(string message, Exception innerException) : base(message, innerException) { }

        public GenteBaseException(SerializationInfo info, StreamingContext context)
            : base(info, context)
        { }
        #endregion

        public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context)
        {
            base.GetObjectData(info, context);
        }

        public override string Message
        {
            get
            {
                return String.Format("{0} - {1}", customMessage, base.Message);
            }
        }
    }
}
